<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="../../kindeditor/themes/default/default.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" charset="utf-8" src="../../kindeditor/kindeditor-all.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../kindeditor/lang/zh-CN.js"></script>

</head>
<body>
<div>
    <input type="button" id="J_selectImage" value="批量上传" />
    <div id="J_imageView"></div>
    <input name="image" type="hidden" id="image" value="">
</div>


<script type="text/javascript">
    KindEditor.ready(function(K) {
        var editor = K.editor({
            filePostName:"file",//form 名称
            uploadJson: '/file/upload',//上传地址
        });
        K('#J_selectImage').click(function() {
            editor.loadPlugin('multiimage', function() {
                editor.plugin.multiImageDialog({
                    clickFn : function(urlList) {
                        console.info("urlList:");
                        console.info(urlList);
                        var div = K('#J_imageView');
                        div.html('');
                        K.each(urlList, function(i, data) {
                            console.info(data);
                            div.append('<img src="' + data.url + '">');
                        });
                        editor.hideDialog();
                    }
                });
            });
        });
    });
</script>

</body>
</html>